home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 40 / 64er_Magazin_Sonderheft_40_19xx_Markt__Technik_de.d64 / master mind (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  270b  |  5 lines

  1. 1 input"[147]stellen";s:e=int(10^s*rnd(0)):gosub2:fori=1tos:l(i)=e(i):next:goto3
  2. 2 fori=1tos:e(i)=e-10*int(e/10):e=int(e/10):c(i)=0:b(i)=0:r=r-(l(i)=e(i)):next:return
  3. 3 v=v+1:inpute:r=0:f=0:gosub2:fori=1tos:forj=1tos:b=(l(j)=e(i))andnotb(i)andnotc(j)
  4. 4 b(i)=b(i)+b:c(j)=c(j)+b:f=f-b:nextj,i:print"[154]"tab(16)r"   "f-r"   "v:ifr<sthen3
  5.